% G - Gaussian pdf
function G = gaussian(sigma_p,r);

rS1 = r;
rS2=r;
x0 = 0;
y0 = 0;
for x=-rS1:rS1
    for y=-rS2:rS2
        xa = 1/(sigma_p * sqrt(2*pi)) * exp ((-(-x-x0)^2) / (2*sigma_p^2));
        ya = 1/(sigma_p * sqrt(2*pi)) * exp ((-(-y-y0)^2) / (2*sigma_p^2));
        G(x+rS1+1,y+rS2+1) = xa * ya;
    end
end
